package org.lalib.controller.form;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.faces.bean.SessionScoped;

import org.lalib.acquire.IControllerForm;
import org.lalib.entity.object.EHistoricalValue;
import org.lalib.entity.object.EItem;
import org.lalib.entity.object.variable.EVariable;
import org.springframework.stereotype.Controller;


@SessionScoped
@Controller("cItemUpdateForm")
public class CItemUpdateForm implements IControllerForm {

	private static final long serialVersionUID = 1L;

	private EItem item;
	private List<String> tabNames = new ArrayList<>();
	private List<EVariable> allVariables = new ArrayList<>();
	@SuppressWarnings("rawtypes")
	private Map<String, List<EHistoricalValue>> historicalValueMap = new HashMap<>();
	@SuppressWarnings("rawtypes")
	private List<EHistoricalValue> eHistoricalValues = new ArrayList<>();

	public void clean() {
		item = null;
		tabNames = new ArrayList<>();
		allVariables = new ArrayList<>();
		eHistoricalValues = new ArrayList<>();
		historicalValueMap = new HashMap<>();
	}

	public EItem getItem() {
		return item;
	}

	public void setItem(EItem item) {
		this.item = item;
	}

	public List<String> getTabNames() {
		return tabNames;
	}

	public void setTabNames(List<String> tabNames) {
		this.tabNames = tabNames;
	}

	public List<EVariable> getAllVariables() {
		return allVariables;
	}

	public void setAllVariables(List<EVariable> allVariables) {
		this.allVariables = allVariables;
	}

	@SuppressWarnings("rawtypes")
	public Map<String, List<EHistoricalValue>> getHistoricalValueMap() {
		return historicalValueMap;
	}

	@SuppressWarnings("rawtypes")
	public void setHistoricalValueMap(Map<String, List<EHistoricalValue>> historicalValueMap) {
		this.historicalValueMap = historicalValueMap;
	}

	@SuppressWarnings("rawtypes")
	public List<EHistoricalValue> geteHistoricalValues() {
		return eHistoricalValues;
	}

	@SuppressWarnings("rawtypes")
	public void seteHistoricalValues(List<EHistoricalValue> eHistoricalValues) {
		this.eHistoricalValues = eHistoricalValues;
	}
}